package com.ScoresSystem.mapper;

import com.ScoresSystem.pojo.Student;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface StudentMapper {

    // 查询所有学生
    List<Student> selectAllStudents(Map<String, Object> map);

    // 修改学生信息
    int updateStudent(Student student);

    // 批量添加学生
    int addStudents(List<Student> students);

    // 添加学生
    int addStudent(Student student);

    // 批量删除学生
    int deleteStudents(List<String> stuNumbers);

    List<Student> getAllStudent(@Param("studentName") String name, @Param("pageIndex") int pageIndex, @Param("pageSize") int pageSize);

    int getCount(@Param("studentName") String studentName);

    Student findStudentByStuNumber(String studentNo);

    int deleteStudent(@Param("studentNo") String studentNo);

    // 查询所有学生姓名
    List<Student> studentSelect();

    // 登录
    Student login(@Param("studentNo") String studentNo, @Param("password") String password);

    Student findStudent(@Param("studentNo") String studentNo, @Param("oldPassword") String oldPassword);

    int updatePassword(@Param("studentNo") String studentNo, @Param("newPassword") String newPassword);
}
